# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-termcolor
_pkgname=termcolor
pkgver=2.5.0
pkgrel=0
pkgdesc="ANSII Color formatting for output in terminal."
url="https://pypi.org/project/termcolor/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-installer py3-hatchling py3-hatch-vcs"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check"

replaces="py-termcolor" # Backwards compatibility
provides="py-termcolor=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/termcolor*.whl
}

sha512sums="
2ef98f82387cc251f6762df7eb103407c52d3dc55d76c71dbf618c38a5c01e12803e8d6fa38f1ec8042ab373b79723e12ef642c18d4b126790a4a3a393ea0917  termcolor-2.5.0.tar.gz
"
